package com.kingsoft.dc.khaos.extender.meta.impl;

import com.alibaba.fastjson.JSON;
import com.kingsoft.dc.khaos.extender.meta.model.ds.Connect;
import com.kingsoft.dc.khaos.extender.meta.model.ds.KafkaConnect;
import com.kingsoft.dc.khaos.extender.meta.utils.RSAEncrypt;

/**
 * create by yansu on 2020/07/08 17:20
 */
public class KafkaDmMetaImpl extends DmMetaImpl{
    @Override
    public Connect decryptDatasourceConnectSecret(String config) {
        KafkaConnect connect = JSON.parseObject(config, KafkaConnect.class);
//        try {
//            connect.setPassword(RSAEncrypt.decryptByRSAPassWord(connect.getPassword()));
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
        return connect;
    }
}
